
$primary-color: #409EFF;
$primary-background-color: #ecf5ff;
$layout-color: #9867f7; 
$layout-hover-bg-color   : fade($layout-color, 24%);
$layout-background-color : fade($layout-color, 12%);
$primary-background-color: fade($primary-color, 6%);
$primary-hover-bg-color  : fade($primary-color, 20%);

$border-color    : #ccc;

.form-design {
  .form-label {
    .is-required:before {
      content: '*';
      color: #F56C6C;
      margin-right: 4px;
    }
  }

  .el-table thead th {
    background: #a9c8ea;
    color: #303133;
    font-size: 13px;

  }


  

  .el-aside{
    overflow: hidden;
    padding: 10px;
  }

  .el-main {
    padding: 10px;
  }

  .el-card__header { 
      text-align: center;
  }

  .el-card__body { 
      overflow: auto;
      height: 90%;
      padding: 5px;
  }

  
  .components-list{
    padding: 8px 0;
    width: 100%;
    height: 100%;

    .widget-cate{
      padding: 8px 12px;
      font-size: 13px;
    }

    ul{
      position: relative;
      overflow: hidden;
      padding: 0 10px 10px;
      margin: 0;
    }

    .form-edit-widget-label{
      font-size: 12px;
      display: block;
      width: 45%;
      line-height: 26px;
      position: relative;
      float: left;
      left: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      margin: 1%;
      color: #333;
      border: 1px solid #F4F6FC;
      text-align: center;

      &:hover{
        color: $primary-color;
        border: 1px dashed $primary-color;
      }

      &>a{
        display: block;
        cursor: move;
        background: #F4F6FC;
        border: 1px solid #F4F6FC;

        .icon{
          margin-right: 6px;
          margin-left: 8px;
          font-size: 14px;
          display: inline-block;
          vertical-align: middle;
        }

        span{
          display: inline-block;
          vertical-align: middle;
        }
      }
    }
  }



  .form-panel {
         height       : 600px;
        //height          : 100%;
        background      : #eee;
        // border       : 1px solid #ccc;
        position        : relative;

        &.no-toolbars-top {
          height: calc(100% - 50px);
        }

        >.hint-text {
          position  : absolute;
          left      : 0;
          top       : 45%;
          width     : 100%;
          text-align: center;
          font-size : 20px;
          color     : #aaa;
          z-index   : 16;
        }

        .a-form-box {
          height       : 100%;
          // box-shadow: 0px 1px 5px 1px #ccc;
        }

        .draggable-box {
          height  : 100%;
          overflow: auto;

          .list-main {
            min-height   : 100%;
            padding      : 5px;
            position     : relative;
            background   : #fafafa;
            // border    : 1px #ccc dashed;

            .moving {
              // 拖放移动中
              // outline-width: 0;
              min-height      : 35px;
              box-sizing      : border-box;
              overflow        : hidden;
              padding         : 0 !important;
              // margin       : 3px 0;
              position        : relative;

              &::before {
                content   : '';
                height    : 5px;
                width     : 100%;
                background: $primary-color;
                position  : absolute;
                top       : 0;
                right     : 0;
              }
            }

            .drag-move-box {
              position  : relative;
              box-sizing: border-box;
              padding   : 8px;
              overflow  : hidden;
              transition: all .3s;
              min-height: 36px;

              &:hover {
                background: $primary-hover-bg-color;
              }

              // 选择时 start
              &::before {
                content   : '';
                height    : 5px;
                width     : 100%;
                background: $primary-color;
                position  : absolute;
                top       : 0;
                right     : -100%;
                transition: all .3s;
              }

              &.active {
                &::before {
                  right: 0;
                }

                background    : $primary-hover-bg-color;
                outline-offset: 0;
              }

              // 选择时 end
              .form-item-box {
                position  : relative;
                box-sizing: border-box;
                word-wrap : break-word;

                &::before {
                  content : "";
                  position: absolute;
                  width   : 100%;
                  height  : 100%;
                  top     : 0;
                  left    : 0;
                  z-index : 888;
                }

                .ant-form-item {
                  // 修改ant form-item的margin为padding
                  margin        : 0;
                  padding-bottom: 6px;
                }
              }

              .show-key-box {
                // 显示key
                position : absolute;
                bottom   : 2px;
                right    : 5px;
                font-size: 14px;
                z-index  : 999;
                color    : $primary-color;
              }

              >.copy,
              >.delete {
                position   : absolute;
                top        : 0;
                width      : 30px;
                height     : 30px;
                line-height: 30px;
                text-align : center;
                color      : #fff;
                z-index    : 989;
                transition : all .3s;

                &.unactivated {
                  opacity       : 0 !important;
                  pointer-events: none;
                }

                &.active {
                  opacity: 1 !important;
                }
              }

              >.copy {
                border-radius: 0 0 0 8px;
                right        : 30px;
                background   : $primary-color;
              }

              >.delete {
                right     : 0px;
                background: $primary-color;
              }

            }

            

           
          }
        }
      }

    

     // 表格右键菜单样式
    .right-menu {
      width     : 190px;
      background: #fff;
      border    : 1px solid #ccc;
      position  : fixed;
      transition: all 0s;
      box-shadow: 3px 3px 5px #999;
      padding   : 8px 0;
      z-index   : 999;

      ul {
        padding   : 0;
        margin    : 0;
        list-style: none;

        li {
          cursor     : pointer;
          user-select: none;
          padding    : 0 15px;
          height     : 30px;
          line-height: 30px;
          font-size  : 14px;

          &:hover {
            background: #eee;
          }
        }
      }
    }  



// 表单设计器-表格样式



.properties-centent {
          height    : 100%;
          overflow  : hidden;
          background: #fff;

          .head-title {
            height       : 48px;
            line-height  : 48px;
            padding      : 0 24px;
            font-size    : 16px;
            border-bottom: 1px solid $border-color;
            color        : rgba(0, 0, 0, 0.85);
          }

          .properties-body {
            overflow: auto;
            height  : calc(100% - 48px);
            padding : 8px 16px;

            .el-form {
              height: calc(100% + 20px);
              .el-form-item {
                margin-bottom: 0;
                padding      : 5px 0; 

                .el-form-item__label , .el-radio__label , .el-switch__label , *{ 
                  font-size: 13px;
                }
  
                .el-checkbox {
                  font-size: 13px;
                  .el-checkbox__label {
                    font-size: 13px;
                  }
                }
              }

            }

            
          }



    }

}


// 动态表格设计面板样式
.batch-box {
              >.batch-label {
                font-size  : 16px;
                font-weight: 500;
                padding    : 10px 10px;
              }

              .draggable-box {
                min-height: 60px;
                width     : 100%;
                border    : 1px #ccc dashed;
                background: #fff;

                .list-main {
                  min-height : 60px;
                  position   : relative;
                  border     : 1px #ccc dashed;
                  overflow-x : auto;
                  overflow-y : auto;
                  white-space: nowrap;

                  .moving {
                    // 拖放移动中
                    width     : 175px;
                    min-height: 94px;
                    display   : inline-block;
                  }

                  >div {
                    min-width     : 185px;
                    display       : inline-block;
                    vertical-align: top;

                    .ant-form-item>.ant-form-item-label,
                    .ant-form-item>.ant-form-item-control-wrapper {
                      text-align: left;
                      display   : block;
                    }

                    .ant-col {
                      width: 100%;
                    }

                  }
                }
              }
}


.batch-box,
.grid-box,
.table-box {
              position  : relative;
              box-sizing: border-box;
              padding   : 5px;
              background: $layout-background-color;
              width     : 100%;
              transition: all .3s;
              overflow  : hidden;
              min-height: 30px;

              .form-item-box {
                position  : relative;
                box-sizing: border-box;

                .ant-form-item {
                  // 修改ant form-item的margin为padding
                  margin        : 0;
                  padding-bottom: 15px;
                }
              }

              .grid-row,
              .table-layout {
                background: $layout-background-color;


                .grid-col,
                .table-td {
                  .draggable-box {
                    min-height: 60px;
                    min-width : 50px;
                    border    : 1px #ccc dashed;
                    background: #fff;

                    .list-main {
                      min-height: 60px;
                      position  : relative;
                      border    : 1px #ccc dashed;
                    }
                  }
                }
              }

              // 选择时 start
              &::before {
                content   : '';
                height    : 5px;
                width     : 100%;
                background: transparent;
                position  : absolute;
                top       : 0;
                right     : -100%;
                transition: all .3s;
              }

              &.active {
                &::before {
                  background: $layout-color;
                  right     : 0;
                }

                background    : $layout-hover-bg-color;
                outline-offset: 0;
              }

              >.copy,
              >.delete {
                position   : absolute;
                top        : 0px;
                width      : 30px;
                height     : 30px;
                line-height: 30px;
                text-align : center;
                color      : #fff;
                z-index    : 989;
                transition : all .3s;

                &.unactivated {
                  opacity       : 0 !important;
                  pointer-events: none;
                }

                &.active {
                  opacity: 1 !important;
                }
              }

              >.copy {
                border-radius: 0 0 0 8px;
                right        : 30px;
                background   : $layout-color;
              }

              >.delete {
                right     : 0px;
                background: $layout-color;
              }
}  

.el-dialog__header {
    padding: 10px 20px 10px;
    background: #a9c8ea;
    .el-dialog__title {
      line-height: 20px;
      font-size: 16px;
    }

    button {
      top: 10px;
    }
  }



.form-table {
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s;
  border-collapse: collapse;
  
  tr {
    transition: all 0.3s;
    border-collapse: collapse;

    .el-form-item   {
        margin-bottom: 0!important;
    }
    td {
      box-sizing: border-box;
      transition: all 0.3s;
      padding: 12px 12px;
      border-collapse: collapse;
       
      display: table-cell;
      vertical-align: inherit;

      .el-form-item   {
        margin-bottom: 0!important;
      }

    }
  }
  &.bordered {
    // 添加边框
    tr {
      td {
        border: 1px solid #e8e8e8 !important;
      }
    }
  }
  &.bright {
    // 点亮行
    tr {
      &:hover > td {
        background: #e6f7ff;
      }
    }
  }
  &.small {
    // 紧凑型
    tr {
      td {
        padding: 8px 8px;
      }
    }
  }
  .el-row .el-form-item{
    margin: 0 !important;
  }


}